<%-- 
    Document   : SearchCar
    Created on : Nov 2, 2011, 12:14:56 AM
    Author     : MrKoi
--%>

<%@page import="DAL.ModelCarBean"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page session="true" import="java.util.Collection" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>East2West Tours and Travels</title>
        <style>
            #CarType
            {
                width:140px;
            }
            
        </style>
    </head>
    <body>
        
        <form action="ControllerSearchCar" method="post">
            <table border="0" width="248px">
                <tr>
                     <td colspan="2">Air-conditioning: 
                         <input type="radio" name="condition" value="Yes" checked="True" />Yes
                         <input type="radio" name="condition" value="No">No
                     </td>
                </tr>      
                 <tr>
                     <td>Seating</td>
                     <td>from<input type="text" name="Seatfrom" size="5"/>-to<input type="text" name="Seatto" size="5"/></td>
                </tr> 
                 <tr>
                     <td>Type</td>
                     <td>
                         <select name="CarType" id="CarType">
                            <option value="0">-- Choose Type --</option>
                            <option value="Small Size">Small Size</option>
                            <option value="Full Fize">Full Fize</option>
                            <option value="Luxury">Luxury</option>
                            <option value="Minivan">Minivan</option>
                        </select>
                     </td>
                </tr> 
                <%
                 ModelCarBean mc=new ModelCarBean();
                 Collection collec=mc.ListModelCar();
                 request.setAttribute("mcar",collec);
                %>
                 <tr>
                     <td>Car mode</td>
                     <td>
                        <select name="ModelCar" id="ModelCar" >
                        <option value="0"  >-- choose Model --</option>  
                        <c:forEach items="${mcar}" var="mocar">                        
                            <option value="${mocar.modelID}">${mocar.modelName}</option>                       
                        </c:forEach>
                        </select>
                     </td>
                </tr> 
                    <tr>
                    <td colspan="2"><hr/></td>
                </tr>
                <tr>
                    <td></td>
                    <td><input type="submit" value="Search" /></td>
                </tr>
            </table>
        </form> 
    </body>
</html>
